home *** CD-ROM | disk | FTP | other *** search
- /* doc_util.c - utilities for document index programs */
- #include "stdio.h"
- #include "ctype.h"
-
- int cmp_part(s1,s2) /* compare all chars in s1 to s2 */
- char s1[] ; /* first string */
- char s2[] ; /* second string */
- {
- int i, n, ret ;
-
- n = strlen(s1) ;
- for(i=0 ; i<n ; i=i+1) /* compare no chars in s1 */
- { ret = tolower(s1[i]) - tolower(s2[i]) ;
- if( ret != 0 )
- break ;
- }
- return( ret ) ;
- }
-
- int add_str(result,s1,s2) /* concentrate two strings */
- char result[] ; /* put the completed result here */
- char s1[] ; /* first string */
- char s2[] ; /* second string */
- {
- strcpy(result,s1) ;
- strcpy(result,s2) ;
- }
-
-
-